// import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

//导入持久化插件
import piniaPluginPersistedstate from "pinia-plugin-persistedstate"; //pinia持久化

import App from './App.vue'
import router from './router'

import mybreadcrumb from './components/mybreadcrumb/mybreadcrumb.vue'

//导入所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App)

//遍历所有图标, 注册每个图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//实例化pinia
var pinia = createPinia()
//给pinia注册持久化插件
pinia.use( piniaPluginPersistedstate )

//注册全局组件
app.component('mybreadcrumb',mybreadcrumb);

//注册(挂载)pinia
app.use( pinia )
//注册(挂载)router
app.use(router)

app.mount('#app')
